home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.amiga.programmer
- Path: chang.unx.sas.com!walker
- From: walker@chang.unx.sas.com (Doug Walker)
- Subject: Re: slink V6.56 problem
- Sender: news@unx.sas.com (Noter of Newsworthy Events)
- Message-ID: <DLuw3q.FJ7@unx.sas.com>
- Date: Sat, 27 Jan 1996 20:11:50 GMT
- X-Nntp-Posting-Host: chang.unx.sas.com
- References: <4deus2$nm5@castle.nando.net> <4dlesn$hq9@oracle.rz.uni-ulm.de> <DLE9LC.Dp4@rose.com> <3102E962.2E3C@nando.net>
- Organization: SAS Institute Inc.
-
- In article <3102E962.2E3C@nando.net>,
- Steve Krueger <sekruege@nando.net> wrote:
- >A White wrote:
- >>
- >> In article <4dlesn$hq9@oracle.rz.uni-ulm.de>,
- >> Jens-Steffen Gutmann <gutmann@informatik.uni-ulm.de> wrote:
- >> >
- >> >Another question: Why does slink work when I split the large
- >> >source file into pieces, compile each and link all together?
- >
- >Because it can insert an ALV between the functions for
- >calls that are >32k away. If it's all in the same .c
- >file, slink has nowhere to put the ALV.
- >
- >sk
-
- To elaborate, the compiler generates 16-bit BSR instructions
- to call functions if CODE=NEAR is on. Sometimes the target
- function is too far away to be reached with a 16-bit offset.
- If so, SLINK attempts to generate a JMP instruction (32-bit)
- that jumps to the function. It tries to insert this JMP
- instruction between your code modules. The BSR is modified
- to point to the JMP, which allows the program to keep working
- even though the destination function was too far away for a
- BSR.
-
- If your code is so big that SLINK can't put a JMP instruction
- within 16k of the BSR instruction, this method won't work.
-
- The JMP instruction that SLINK generates is called an "ALV",
- which means "Auto Load Vector" or something like that. I
- don't really know where the name comes from.
-
-
-
-
-
- --
- ***** / walker@unx.sas.com
- *|_o_o|\\ Doug Walker< BIX, Portal: djwalker
- *|. o.| || \ AOL: weissblau
- | o |//
- ======
- Any opinions expressed are mine, not those of SAS Institute, Inc.
-
-